<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="/struts-tags" prefix="s"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>

<title>My JSP 'add.jsp' starting page</title>
<link href="<%=basePath%>manager/css/style.css" rel="stylesheet"
	type="text/css" />
<script type="text/javascript"
	src="<%=basePath%>common/js/jQuery-1.9.1.js"></script>
</head>

<s:action name="findAll" namespace="/manager_permissionmenu"/>
<s:action name="loading" namespace="/manager_rolepermission">
	<s:param name="ubId" ><%=request.getParameter("ubId") %></s:param>
</s:action>

<body>
	<div class="place">
		<span>位置：</span>
		<ul class="placeul">
			<li><a href="<%= application.getContextPath() %>/common/pager/welcome.jsp">首页</a></li>
			<li><a>角色管理</a></li>
			<li><a href="<%= application.getContextPath() %>/manager/roleTab/list.jsp">角色列表</a></li>
			<li><a>设置角色菜单</a></li>
		</ul>
	</div>

	<div class="formbody">

		<div class="formtitle">
			<span>角色菜单信息</span>
		</div>

		<form action="../../manager_rolepermission/setRolePermission" id="addForm" method="post">
			<input type="hidden" id="rtId" name="rtId" value="${roleTab.rtId}"/>
			<input type="hidden" id="menuId" name="menuId" value="${menuId}"/>
			<ul class="forminfo">
				<li><label >角色名</label> 
					<input type="text" class="dfinput" value="${roleTab.rtName}" disabled="disabled" />
				</li>
				
				<li><label>菜单列表</label> 
					<div style="width: 100%;">
					<c:forEach items="${pmList}" var="pm" varStatus="i">
						<span style="font-size:15px; width:200px; padding: 0 0; margin: 0 0; float:left;" >
							<input name="checkedStatus" style="height: 20px; width: 20px; line-height: 30px; " id="checkedStatus" type="checkbox" value="${pm.pmId}"
							<c:forEach items="${rpList}" var="rpm">
								<c:if test="${pm.pmId == rpm.permissionMenu.pmId}">
									checked='checked'
								</c:if>
							</c:forEach>
							/>${pm.pmName}
						</span>	
						<c:if test="${(i.index+1) % 4 == 0}">
						<span style="clear: both;" ></span>	
						<label >&nbsp;</label>
						</c:if>
					</c:forEach>
				</div>
				</li>
				<li><label>&nbsp;</label> <input type="button" class="btn"
					value="确认修改"
					onclick="javascript:$('.tip').css('display', 'block');" />&nbsp;
					<input type="button" onclick="location.href='<%= application.getContextPath() %>/manager/roleTab/list.jsp'" class="btn" value="返回"  />
				</li>
				<div class="tip">
					<div class="tiptop">
						<span>提示信息</span><a
							onclick="javascript:$('.tip').css('display', 'none');"></a>
					</div>

					<div class="tipinfo">
						<span><img src="<%=basePath%>/manager/images/ticon.png" /></span>
						<div class="tipright">
							<p>是否确认对信息的修改 ？</p>
							<cite>如果是请点击确定按钮 ，否则请点取消。</cite>
						</div>
					</div>

					<div class="tipbtn">
						<input type="submit" " class="sure" value="确定" />&nbsp; <input
							type="button" class="cancel" value="取消"
							onclick="javascript:$('.tip').css('display', 'none');" />
					</div>
				</div>
			</ul>
		</form>
	</div>
</body>
</html>
